import request from "@/utils/request";

//新增接口
export const addMatTypeInfo = (data) => {
  return request({
    url: "base/matType/add",
    method: "post",
    data: data,
  });
};
//编辑接口
export const updateMatTypeInfo = (data) => {
  return request({
    url: "base/matType/edit",
    method: "post",
    data: data,
  });
};
//查询接口
export const queryMatTypeInfoList = (params) => {
  return request({
    url: "base/matType/list",
    method: "get",
    params,
  });
};
//删除接口
export const deleteMatTypeInfo = (params) => {
  return request({
    url: "base/matType/deleteBatch",
    method: "post",
    params,
  });
};
//数据回显接口
export const getMatTypeData = (params) => {
  return request({
    url: `base/matType/queryById?id=${params}`,
    method: "get",
  });
};

// 获取产品列表
export function syncErpMaterial() {
  return request({
    url: "base/matType/syncErpMatType",
    method: "post",
  });
}

// 获取产品列表
export function queryMatTypeTree() {
  return request({
    url: "base/matType/queryMatTypeTree",
    method: "get",
  });
}
